package com.wbf.demo.mapper;

import com.wbf.demo.domain.Role;
import com.wbf.demo.mobile.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper {

    @Select("select r.* from role r " +
            "left join user_role ur on ur.user_id = #{userId} and ur.role_id = r.id")
    List<Role> getUserRoleList(Long userId);
}
